package javamobile.server;

import java.io.IOException;
import java.net.*;

public class DatabaseServer {
	private static int port = 7777;
	
	public static void main(String[] args) {
		ServerSocket server;
		try {
			server = new ServerSocket(port);
			
			while (true) {
				Socket client = server.accept();
				ServerSocketThread sst = new ServerSocketThread(client);
				Thread t = new Thread(sst);
				t.start();
			}
		} catch (IOException e) {
	        System.err.println("Could not listen on port: "+port+"."); 
			e.printStackTrace();
	        System.exit(-1); 
		}
	}
}
